package com.ewzj.bigdata.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.ewzj.bigdata.mvp.contract.ArticleDetailContract;
import com.ewzj.bigdata.mvp.model.ArticleDetailModel;


@Module
public class ArticleDetailModule {
    private ArticleDetailContract.View view;

    /**
     * 构建ArticleDetailModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     * @param view
     */
    public ArticleDetailModule(ArticleDetailContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ArticleDetailContract.View provideArticleDetailView(){
        return this.view;
    }

    @ActivityScope
    @Provides
    ArticleDetailContract.Model provideArticleDetailModel(ArticleDetailModel model){
        return model;
    }
}